<template>
	<view>
		<view class="content">
			<view class="box">
				<text>租用中的订单数量</text>
				<text>{{ data.total_number }}</text>
			</view>
			<view class="box">
				<text>等待送车的数量</text>
				<text>{{ data.await_send }}</text>
			</view>
			<view class="manage" @click="to('../carList/carList')">
				<text>车辆管理</text>
				<text>></text>
			</view>
			<view class="manage" @click="to('../ordrEditing/ordrEditing')">
				<text>订单管理</text>
				<text>></text>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			data: {}
		};
	},
	onLoad() {
		this.getAnAdm();
	},
	methods: {
		to(url) {
			uni.navigateTo({
				url
			});
		},

		async getAnAdm() {
			const { code, data, msg } = await this.$u.post('api/user/user_administrator', { uid: this.uid });
			if (!code) return uni.$showMsg();
			this.data = data;
		}
	}
};
</script>

<style lang="scss" scoped>
.content {
	padding: 20rpx 40rpx;
	.box {
		margin-top: 20rpx;
		width: 100%;
		display: flex;
		justify-content: space-between;
		background: #880000;
		color: #fff;
		border-radius: 20rpx;
		line-height: 50rpx;
		padding: 20rpx;
	}
	.manage {
		padding: 20rpx;
		margin-top: 20rpx;
		width: 100%;
		display: flex;
		justify-content: space-between;
		color: #fff;
		background-color: #2a2929;
		border-radius: 20rpx;
		line-height: 50rpx;
	}
}
</style>
